
#include "apue.h"

char *getpass(const char *);

int main()
{
    char *ptr;

    if ((ptr = getpass("Enter password:")) == NULL)
    {
        err_sys("getpass error");
    }
    printf("password: %s\n", ptr);

    // now use password (probably encrypt it)
    while (0 != *ptr)
    {
        *ptr++ = 0;
    }

    exit(0);
}
